package com.rslai.base.tool.servertest.transport.config;

import com.rslai.base.tool.servertest.annotation.Property;
import com.rslai.base.tool.servertest.transport.command.DubboExecuteCommand;
import com.rslai.base.tool.servertest.transport.command.ExecuteCommand;
import com.rslai.base.tool.servertest.transport.model.ServiceDesc;

public class DubboServiceConfig extends ServiceConfig {
    public static final String name = "dubbo";
    @Property("class")
    private String className;
    @Property
    private String method;
    @Property
    private String url;
    @Property
    private String version;
    @Property
    private String group;

    public ExecuteCommand createCommand() {
        ServiceDesc serviceDesc = new ServiceDesc(this.className, this.method, this.url, this.version, this.group);
        return new DubboExecuteCommand(this.id, serviceDesc, this.desc);
    }
}
